<!DOCTYPE html>
<!-- saved from url=(0047)http://web.hand999.com/daili_mobile/myadmin.php -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>商户管理系统</title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="MobileOptimized" content="240">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="__CSS__/public.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<script src="__JS__/jquery-2.1.0.min.js.下载"></script>
<style type="text/css">
	.info_item .col1{width:20%;}
	.info_item .col2{width:25%;}
	.info_item .col3{width:10%;}
	.info_item a{font-size:10px; color:#F00;}
	.info_list dl dd {height: 45px;line-height: 45px;}
	.info_list dl dd span{position: relative;top: -2px;left: -3px;}

</style>
</head>

<body class="body">
	<div class="page_top_box">
    <center>
        <div class="page_top">
            <a href="<?php echo '__ROOT__/index.html' ?>" class="back"><img src="__IMG__/ico_back.png"></a>
            <!-- <a href="<?php echo '__ROOT__/creatuser.html'; ?>" class="add" onclick="return checkAgent()"><img src="__IMG__/ico_add.png"></a> -->
            <div class="pg_name" onclick="location.reload()">我的代理</div>
			
        </div>
    </center>
    </div>
	 <form id="myform" name="form1" method="post" action="" style="display: none;border-left:solid 1px #dadada;border-right:solid 1px #dadada;">  
		<div class="sousuo" style="margin: 15px 0 0 15px">
			<dl class="sou" style="width:25%;height:50px;margin-top:2%;float:left">
				账号<input id="accounts" style="width:39%;height:40%;border-radius:7px" type="" name="accounts" placeholder="">
			</dl>
			<dl class="sou" style="width:24%;height:50px;margin-top:2%;float:left;">
				姓名<input id="username" style="width:50%;height:40%;border-radius:7px" type="" name="username" placeholder="">
			</dl>
			<dl class="sou" style="width:31%;height:50px;margin-top:2%;float:left">
				<b style="width:10%;">排序</b>
				<select id="type" name="type" style="margin-top:1%;clear:both;width:58%;">
					<!-- <option value="1" >账号</option> -->
					<option value="1">钻石数</option>
					<option value="" selected="selected">默认</option>
				</select>
			</dl>
			<input style="width:15%;height:25px;margin-left:10px;border-radius:9px;background:#FFF;position: relative;top: 5px;" type="submit" name="soso" value="搜索" class="btn">
		</div>
	</form>
	<div id="sousuo" style="height: 30px;border-bottom:solid 1px #dadada;border-left:solid 1px #dadada;border-right:solid 1px #dadada;">
	<p class="dianji" style="text-align: center;line-height: 30px;font-size: 16px">搜索请点击</p>
	<img id="img" src="__IMG__/left_arrow.png" alt="" style="margin:4px 47%;display:none;">
	</div>
	<script type="text/javascript"> 
		$(document).ready(function(){
		$("#sousuo").click(function(){
		    $("#myform").slideToggle("slow");
		    $(".dianji").toggle("slow");
		    $("#img").toggle("slow");
		  });
		});
	</script>
	
		<dl class="info_item item_head">
			<dt class="col1" style="width:20%;font-size: 15px">账号</dt>
			<dt class="col2" style="width:16%;font-size: 15px">姓名</dt>
			<dt class="col1" style="width:12%;font-size: 15px">钻石</dt>
			<dt class="col5" style="width:12%;font-size: 15px">详情</dt>
			<dt class="col2" style="width:20%;font-size: 15px">操作</dt>
			<dt class="col3" style="width:20%;font-size: 15px">返利额度</dt>
		</dl>
	
	<?php 	foreach ($sql as $k=>$v) { ?>
    <div id="ulist" class="info_list">
    	<dl class="info_item item_white">
	<!-- <?php if ($one['agencylv']>=1) {echo'<dd class="col1" style="width:19%;font-size:10px;"><span>';}?> -->
			<dd class="col1" style="width:20%;font-size:10px;">
				<span>
					<?php 
					if($v['agencylv']==0){
						echo '总';} 
					if($v['agencylv']==1){
						echo '壹';} 
					if($v['agencylv']==2){
						echo '普';}
					?>
				</span><?php echo $v['accounts'] ?>
			</dd>
			<dd class="col2" style="width:16%">
				  <?php echo '<a href="__ROOT__/agentbuygold?accounts=',$v['accounts'].'" style="position: relative;top: -2px;">'.$v['username']?></a></dd>
			</dd>
			<dd class="col1" style="width:12%;font-size:10px;">
	    	   <?php echo $v['gems'] ?>
	    	</dd>
			
			<dd class="col3" style="width:12%">
	    	  <?php if ($purview['myinfoxia']==1 || $one['agencylv']==100) {
	    	  echo '<a href="__ROOT__/myinfo?accounts=',$v['accounts'].'" style="position: relative;top: -2px;">查看</a>
	    	  ';}?>
	    	</dd>
			
			<dd class="col2" style="width:20%;font-size:10px;">
	        <?php if ($purview['drilling']==1 || $one['agencylv']==100) {
		         echo '<a href="__ROOT__/ChargeGoldToAgent?userid=',$v['userid'].'">充钻</a>
		     ';}?>
			<?php if ($purview['agentmodi']==1 || $one['agencylv']==100) {
				echo'<a href="__ROOT__/agentmodi?userid=',$v['userid'].'">修改</a>
			';}?>
			</dd>
			<dd class="col1" style="width:20%;line-height:26px;font-size:10px;">
			<p style="position: relative;top: 9px;font-weight: 500;">
			<?php 
			if($_SESSION['agencylv']==100){
			     echo "0";
			}
			elseif($v['floor']==1){
	    		 echo $quota['first_upper_rebate']*100; 
			}elseif($v['floor']==2){
			     echo $quota['second_upper_rebate']*100;
			}elseif($v['floor']>=3){
			     echo $quota['disbate']*100;
			}
			elseif($v['referrer'] ==$_SESSION['accounts']){
			     echo $quota['first_upper_rebate']*100;
			}
			?>%
			</p>
	    	</dd>
		
	  	</dl>    
	</div>
		<?php } ?>
 
	<div id="" smore="" class="list_more" onclick="showMore()">加载更多</div>
    <input id="cpage" name="cpage" type="hidden" value="1">
    	<!-- <a href="#" onclick="goTop();return false;"><img style="width:60px;float:right" src="__IMG__/top.jpg"></a> -->

    <div class="pg_foot_box">
<center>
    <div class="pg_foot">
        <a href="<?php echo '__ROOT__/index.html' ?>">商户管理平台</a>
    </div>
</center>
</div>    
     <div id="hintbox" class="hint_box">
        <span id="hintmsg"></span>
    </div>   
	<?php //echo '__ROOT__/creatuser',array('accounts'=>$v['accounts']) ?>
    <script type="text/javascript">
		<!-- function goSearch(){ -->
			<!-- if($("#userid").val() == ""){ -->
				<!-- hintPop("请输入玩家ID！"); return false; -->
			<!-- } -->
			
			<!-- window.location.href="?usid=" + $("#userid").val(); -->
		<!-- } -->
function goTop(acceleration, time)
{ 
	acceleration = acceleration || 0.1; 
	time = time || 16; 
	 
	var x1 = 0; 
	var y1 = 0; 
	var x2 = 0; 
	var y2 = 0; 
	var x3 = 0; 
	var y3 = 0; 
	 
	if (document.documentElement) 
	{ 
		x1 = document.documentElement.scrollLeft || 0; 
		y1 = document.documentElement.scrollTop || 0; 
	} 
	if (document.body) 
	{ 
		x2 = document.body.scrollLeft || 0; 
		y2 = document.body.scrollTop || 0; 
	} 
	var x3 = window.scrollX || 0; 
	var y3 = window.scrollY || 0; 
	 
	// 滚动条到页面顶部的水平距离 
	var x = Math.max(x1, Math.max(x2, x3)); 
	// 滚动条到页面顶部的垂直距离 
	var y = Math.max(y1, Math.max(y2, y3)); 
	 
	// 滚动距离 = 目前距离 / 速度, 因为距离原来越小, 速度是大于 1 的数, 所以滚动距离会越来越小 
	var speed = 1 + acceleration; 
	window.scrollTo(Math.floor(x / speed), Math.floor(y / speed)); 
	 
	// 如果距离不为零, 继续调用迭代本函数 
	if(x > 0 || y > 0) { 
	var invokeFunction = "goTop(" + acceleration + ", " + time + ")"; 
	window.setTimeout(invokeFunction, time); 
	} 
} 
	
		function showMore(){
			var total = Number("1");
			var cpage = Number($("#cpage").val());
			if(cpage >= total){
				hintPop("没有更多代理了"); return false;
			}else{
				$.ajax({
					type: "get",
					url: "prog.php?ac=ajax.class&do=myadmin",
					data: {"pset": "10","cpage": cpage},
					success: function (result) {
						$("#ulist").append(result);
						$("#cpage").val(cpage + 1);
						
					}
				});
			}
		}

		function checkAgent(){
			$.ajax({
				url:"prog.php?ac=ajax.class&do=agnum&agid=544677&" + Math.random(),
				success:function(result){
					if(result == 1)
						 window.location.href = "creatuser.php?agent=544677";
					else
						hintPop("您添加的代理人数已达到上限！");
						
					return false;			
				}
			});
		}
		
		function hintPop(msg){
			$("#hintmsg").html(msg);
			$("#hintbox").css({"opacity": "1", "display": "block"});
			$("#hintbox").animate({"bottom":"80px"}, "last", function(){
				setTimeout(function(){
					$("#hintbox").animate({"opacity": "0"}, "last", function(){
						$("#hintbox").css({"bottom":"0px", "display": "none"});
					});
				}, 2000);
			});
		}
	</script>

</body></html> 